libarchive: Handle `archive_entry_symlink()` returning NULL
authorColin Walters <walters@verbum.org>
Mon, 4 Apr 2022 14:25:35 +0000 (10:25 -0400)
committerColin Walters <walters@verbum.org>
Mon, 4 Apr 2022 14:25:35 +0000 (10:25 -0400)
commit2346d5f4d581ca11617e0f215a40cf146754cb22
tree87af9097cda1af190d2844cb22326011ffbccae8
parentfdfb353f19e8e7f3f62cf26e1a6840ca9649012d
libarchive: Handle `archive_entry_symlink()` returning NULL

The `archive_entry_symlink()` API can definitely return `NULL`,
reading through the libarchive sources.

I hit this in the wild when using old ostree-ext to try to unpack
a chunked archive.

I didn't try to characterize this more, and sorry no unit test right
now.
src/libostree/ostree-repo-libarchive.c